function noMultipleClicks(methods) {
	let that = this;

	if (typeof(that.noClick) == 'undefined') {
		that.noClick = true;
	}

	if (that.noClick) {
		that.noClick = false;
		methods();
		setTimeout(function() {
			that.noClick = true;
		}, 2000)
	}
}

let requestMethod = {
	takeFood: function(para , that) {
		let _this = that;
		_this.$http.get('/order/set_order_finished', {
					data: para
				}, (res) => {
			if (res.data.code == 20000) {
				uni.showToast({
					title: '领餐成功！',
					icon: 'none',
				})
				return true
			} else {
				uni.showToast({
					title: res.data.message,
					icon: 'none',
				})
				return false
			}
		});
	}
}


//导出
export default {
	noMultipleClicks,//禁止多次点击
	requestMethod, 
}
